<!--{template common/header_simple_start}-->
<link rel="stylesheet" href="static/css/checkbox.css" media="all">
<link href="{MOD_PATH}/images/index.css" rel="stylesheet" media="all">
<link href="static/atwho/css/jquery.atwho.css?{VERHASH}" rel="stylesheet" media="all">
<link href="{MOD_PATH}/images/datepicker.css?{VERHASH}" rel="stylesheet" media="all">
<link rel="stylesheet" type="text/css" href="static/dzzthumb/jquery.dzzthumb.css">
<link href="static/atwho/css/jquery.atwho.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/dzzthumb/jquery.dzzthumb.js?{VERHASH}"></script>
<script type="text/javascript" src="static/js/smilies.js?{VERHASH}"></script>
<script type="text/javascript" src="static/js/imgReady.js?{VERHASH}"></script>
<script type="text/javascript" src="static/js/jquery.textareaexplander.js?{VERHASH}"></script>
<!--{if $ismobile}-->
<script type="text/javascript" src="static/js/touch-0.2.14.min.js?{VERHASH}"></script>
<!--{/if}-->
<!--{if $ismobile && $SignPackage}-->
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<!--{/if}-->
<script type="text/javascript" src="{MOD_PATH}/scripts/main.js?{VERHASH}"></script>
<script type="text/javascript" src="{MOD_PATH}/scripts/atbox.js?{VERHASH}"></script>
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<script src="static/atwho/js/jquery.caret.js?{VERHASH}"></script>
<script src="static/atwho/js/jquery.atwho.js?{VERHASH}"></script>
<script src="{MOD_PATH}/scripts/jqthumb.js"></script>
<style>
body{
	background:#ededef;
	-webkit-touch-callout:none;
}
.header{
	background:#FFF;
	border:1px solid #e1e1e1;
	margin-top:10px;
	margin-bottom:10px;
	border-radius:3px
}
#wrapper_div{
	border-radius:3px 3px 0 0;
}
.header-banner{
	position:relative;
	padding:1em 0;
}
.header-banner.cover{
	height:200px;
	overflow:hidden;
}
.filter{
	padding:10px;
	box-shadow:none;
}
@media (max-width: 768px){
	.header{
		margin-bottom:0;
		margin-top:0;
		border:0;
		border-radius:0
	}
	#wrapper_div{
		border-radius:0;
	}
}

.siteinfo{
	padding:1em;
	opacity: 0.9;
	text-shadow: 1px 1px 1px #000;
	color: #FFF;
	text-align:center;
	overflow:hidden;
}
.siteinfo-title {
	font-size:2em;
	margin-bottom:0.5em;
	font-weight: 700;
}
.siteinfo-subtitle {
	font-size: 1.4em;
}
.btn-sm.btn-outline-inverse{
	padding:3px 5px;
}
.hide1{
	display:none !important;
}
.no-member-at{
	color: #d0d0d0 !important;
}
.no-member-at:hover{
	opacity: 0.65 !important;
}
.itemContainer .list-item:nth-child(2) {
	margin-top: 20px !important;
}
</style>
<script type="text/javascript">
var baseurl='{MOD_URL}';
var ajaxurl='{MOD_URL}&op=ajax&jid=$jid';
var modpath='{MOD_PATH}';
var jid = "$_GET['id']";
var lastvisit=parseInt('{TIMESTAMP}');
var newdelay=10000;//10s
</script>
<script src="{MOD_PATH}/scripts/jquery_$.js"></script>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
    <div class="bs-main-container" style="margin-left:0;">
      <!--{if $jilu[inarchive]}-->
      <div class="headBox">
          <div class="waring">
              <div class="waringInfo">
                  <span class="asterisk">*</span>
                  <!--{if !$_G['uid']}-->{eval echo lang('need_logined_comment')}，<a href="{MOD_URL}" style="color: #99390f;">{eval echo lang('now_login')}</a><!--{else}-->{eval echo lang('archived_need_active_to_edit')}<!--{/if}-->
              </div>
              <span class="close_btn"><i class="dzz dzz-close" style="font-size: 20px"></i></span>
          </div>
          <div class="info">
              <i class="i_icon dzz dzz-book" style="color: rgba(116, 116, 116, 1);font-size: 24px;"></i>
              <div class="tit">$jilu[title]</div>
              <div class="intro">
                  $jilu[desc]
              </div>
          </div>
          <!--{if $perm >= 3}-->
          <div class="btnWr btnWr2">
              <a href="javascript:;"  class="js-popbox-item btn sureBtn" data-href="{MOD_URL}&op=menu&do=menu&step=5&jid=$jid" data-placement="left" data-auto-adapt="true">{eval echo lang('activation')}</a>
          </div>
          <!--{/if}-->
      </div>
      <script type="text/javascript">
        jQuery(function () {
            if(jQuery('.intro').height()==0) {
                jQuery('.btnWr2').css('top',19);
            }
            jQuery('.js-popbox-item').click(function() {
                showWindow('$jid',jQuery(this).data('href'));
            })
            jQuery(".close_btn").click(function () {
                jQuery(this).parent().css("display","none");
            })
            }
          )
      </script>
      <!--{else}-->
      <div class="addNotes" style="margin-top: 30px">
        <div class="myNotes noteTitle">
            <div class="imgWrap">
                <i class="dzz dzz-book" style="font-size: 24px;color:  rgba(116, 116, 116, 1)"></i>
            </div>
            <h4 class="avatarTit">{$jilu['title']}</h4>
        </div>
        <div class="note-info">{$jilu['desc']}</div>

        <!--{if $jilu['deletetime'] <= 0 && $perm >= 2}-->
        <div class="addInp">
            <div class="clickWord">
                <div class="word">{eval echo lang('add_item')}</div>
            </div>
        </div>
        <!--{elseif $jilu['jilu']<1}-->
				<div class="addInp">
            <div class="clickWord">
                <div class="word">{eval echo lang('add_item')}</div>
            </div>
        </div>
				<!--{/if}-->
              
              <div class="clickInput">
                  <form id="publishform" name="form" class="form-horizontal" action="{MOD_URL}&op=ajax&do=publish" method="post"  onsubmit="return false;" style="margin:0">
                      <input type="hidden" name="formhash" value="{FORMHASH}" />
                      <input type="hidden" name="publishsubmit" value="true" />
                      <input type="hidden" name="handlekey" value="publish_text" />
                      <input type="hidden" name="jid" value="$jid" /> 
                      <!-- <input type="hidden" name="type" value="list" /> -->
                      <textarea name="content" class="form-control form-control-bborder" rows="" cols="2" id="notes" placeholder="{eval echo lang('add_item')}"></textarea>
                  </form>
                  <div class="butonGroups">
                      <div class="left_btn">
                          <i title="{eval echo lang('detailed_list')}" class="V dzz dzz-view-list" data-toggle="tooltip" data-placement="bottom" data-type="list"></i>
                          <!--{if count($at_users) > 0}-->
                          <i title="{eval echo lang('who_at')}" class="dzz dzz-atsign dzz-at" data-toggle="tooltip" data-placement="bottom" data-type="at" id="atwho"></i>
                          <!--{else}-->
                          <i title="{eval echo lang('no_member_at')}" class="dzz dzz-atsign dzz-at no-member-at" data-toggle="tooltip" data-placement="bottom"></i>
                          <!--{/if}-->
                          <i title="{eval echo lang('link')}" class="V dzz dzz-link" data-toggle="tooltip" data-placement="bottom" data-type="link"></i>
                          <i title="{eval echo lang('attach')}" class="V dzz dzz-file" data-toggle="tooltip" data-placement="bottom" data-type="attach"></i>
                          <i title="{eval echo lang('image')}" class="V dzz dzz-photo" data-toggle="tooltip" data-placement="bottom" data-type="image"></i>
                      </div>
                      <div class="right_btn">
                          <button id="publishform_btn" class="btn sureBtn" onclick="submit_doadd();">{eval echo lang('affirm')}</button>
                          <button class="btn cancelBtn cancelBtn_head">{eval echo lang('cancel')}</button>
                      </div>
                  </div>
              </div>
          </div>
      <script type="text/javascript">
              function submit_doadd(){
                  if(jQuery('#notes').val()=='') {
                      showmessage('{lang please_enter_content}','danger',1000,1);
                      return;
                  }else if(jQuery('#content_list').val()=='' && jQuery('#lists .todolist-item').length==1) {
                      showmessage('{lang please_enter_content}','danger',1000,1);
                      return;
                  }else if(jQuery('#content_link').val()=='' && jQuery('#linkContainer').html()=='') {
                      showmessage('{lang please_enter_content_or_link}','danger',1000,1);
                      return;
                  }else if(jQuery('#content_attach').val()=='' && jQuery('#attachContainer_attach .attach-item').length==1) {
                      showmessage('{lang please_enter_content_or_file}','danger',1000,1);
                      return;
                  }else if(jQuery('#content_image').val()=='' && jQuery('#imageContainer_image .image-item').length==1) {
                      showmessage('{lang please_enter_content_or_photo}','danger',1000,1);
                      return;
                  }
                  var html = '<form id="publishform" name="form" class="form-horizontal publishform" action="{MOD_URL}&op=ajax&do=publish" method="post"  onsubmit="return false;" style="margin:0">'
                      + '<input type="hidden" name="formhash" value="{FORMHASH}" />'
                      + '<input type="hidden" name="publishsubmit" value="true" />'
                      + '<input type="hidden" name="handlekey" value="publish_text" />'
                      + '<input type="hidden" name="jid" value="$jid" />'
                      + '<textarea name="content" rows="" cols="" id="notes" placeholder="{eval echo lang('add_item')}"></textarea>'
                      + '</form>';
                  ajaxpost('publishform', 'publishform_btn','publishform_btn');
                  jQuery('.butonGroups .left_btn .V').css('color','#4e5563');
                  jQuery(".addInp").css("display","block");
                  jQuery(".addNotes").css("margin-bottom","0");
                  jQuery(".clickInput").css("display","none");
                  jQuery(".butonGroups").prevAll().remove();
                  jQuery(".clickInput").prepend(html);
                  initAtwho();
              }
              function succeedhandle_publish_text(url, message, values) {
                  hideWindow('$_GET[handlekey]');
                  jQuery(".empty_alert").remove();
                  var jid=values['jid'];
                  if(values['rid']>0){
                      // jQuery('#publishform_btn').button('loading');
                      jQuery.get('{MOD_URL}&op=ajax&do=getItem&rid='+values['rid'],function(html){
                          // jQuery('#publishform_btn').button('reset').html('发布');
                          jQuery('#publishform_btn').html('{eval echo lang("affirm")}');
                          var tel=jQuery('#itemContainer>.list-item:first');
                          if(tel.length){
                              jQuery(html).hide().insertBefore(tel).slideDown();
                          }else{
                              jQuery(html).hide().appendTo('#itemContainer').slideDown();
                          }
                      });
                  }
              };
              function errorhandle_publish_list(message) {
                  showmessage(message,'danger',3000,1);
                  jQuery('#fwin_{$_GET[handlekey]} input[name="content"]').focus();
              };
          </script>
      <!--{/if}-->
      <div id="itemContainer" class="itemContainer">
         <div class="w-load2" id="loadfirst">
               <!--<div class="load">{eval echo lang('loading')}</div>-->
               <div class="loader">
                   <div class="loader-inner ball-beat">
                       <div></div>
                       <div></div>
                       <div></div>
                   </div>
               </div>
           </div>
      </div>
    </div>
</div>   
<div id="menu" class="modal fade pop-menu-madal ">
  <div class="modal-dialog">
    <div class="modal-content" >
      <ul class="pop-menu list-unstyled" role="menu">
      </ul>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div href="javascript:;" class="scroll_top"></div>
<script type="text/javascript">
<!--{if $ismobile}-->
	var tap='touchend';
<!--{else}-->
	var tap='click';
<!--{/if}-->
jQuery('.left-drager').leftDrager_layout();
jQuery(function () {
	jQuery('img[data-original]:visible').dzzthumb({allowdownload:0});
    jQuery('.left-drager').leftDrager_layout();
})
//点击回到顶部
var width = jQuery(".bs-main-container").width();
jQuery(".bs-main-container").scroll(function(e) {
	var height = jQuery(".bs-main-container").height();
	if(jQuery(".bs-main-container").scrollTop() > height){
		jQuery(".scroll_top").fadeIn()
	} else {
		jQuery(".scroll_top").fadeOut()
	}
})
jQuery(document).on('click','.scroll_top',function(){
    jQuery(".bs-main-container").animate({scrollTop:0},10);
    return false;
});

<!--{if $ismobile && $SignPackage}-->
wx.config({
    debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
    appId: '$SignPackage[appId]', // 必填，企业号的唯一标识，此处填写企业号corpid
    timestamp: parseInt('$SignPackage[timestamp]'), // 必填，生成签名的时间戳
    nonceStr: '$SignPackage[nonceStr]', // 必填，生成签名的随机串
    signature: '$SignPackage[signature]',// 必填，签名，见附录1
    jsApiList: ['chooseImage','previewImage','uploadImage','getLocation','openLocation','showMenuItems','hideMenuItems','closeWindow','getNetworkType','scanQRCode'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
});
wx.ready(function(){
	window.wxready=1;
});
jQuery(document).on(tap,'.location-open',function(){
	var el=jQuery(this);
	if(window.wxready){
		wx.openLocation({
			latitude: parseFloat(el.attr('locationy')), // 纬度，浮点数，范围为90 ~ -90
			longitude:  parseFloat(el.attr('locationx')), // 经度，浮点数，范围为180 ~ -180。
			name: el.text(), // 位置名
			address: el.attr('title'), // 地址详情说明
			scale: 15, // 地图缩放级别,整形值,范围从1~28。默认为最大
			infoUrl: '' // 在查看位置界面底部显示的超链接,可点击跳转
		});
	}
	return false;
});
<!--{/if}-->
var Timer=null;
window.onresize=function(){
	if(Timer) window.clearTimeout(Timer);
	Timer=window.setTimeout(function(){
		setImage(document.getElementById('imgbg'));
	},50);
}
var oldscrollTop=0
jQuery(".bs-main-container").scroll(function(e) {
	if(jQuery(".popbox-container").children(".loadding").length <= 0){
		jQuery(".popbox").hide();
	}
	var main_container = jQuery(".bs-main-container").height();
	var container_h = jQuery(".itemContainer").height();
	var scroll_top = jQuery(".bs-main-container").scrollTop();
    if(scroll_top+main_container>=container_h-20){
		 jQuery('#loadmore').trigger(tap);
	}
});

jQuery(document).on('focus','textarea',function(){
	jQuery('#publish_stick').addClass('hide');
	jQuery(this).on('blur',function(e){
		jQuery('#publish_stick').removeClass('hide');
		return true;
	});
	return true;
});

jQuery(document).ready(function(e) {
    jQuery(".clickWord").click(function() {
        jQuery(this).parent().css("display","none");
        jQuery(".clickInput").css("display",'block');
        jQuery(".addNotes").css("margin-bottom","20px");
        jQuery("#notes").focus();
        jQuery('#notes').TextAreaExpander(50,99999);
    });
    jQuery(".cancelBtn_head").click(function() {
        jQuery(this).parent().parent().parent().css("display","none");
        jQuery(".addInp").css("display","block");
        jQuery(".addNotes").css("margin-bottom","0");
        jQuery("#notes").val("");
    });
	jQuery(document).on(tap,'.video-cover',function(e){//视频预览
		var el=jQuery(this).closest('.file_fed');
		var url=jQuery(this).data('url');
		var html=AC_FL_RunContent('width', '100%', 'height', '100%', 'allowNetworking', 'internal', 'allowScriptAccess', 'never', 'src', url, 'quality', 'high', 'bgcolor', '#ffffff', 'wmode', 'transparent', 'allowfullscreen', 'true');
		
		if(el.find('.ico_ffed:hidden').length){
			el.find('.video-box-close').trigger(tap);
		}else{
			el.find('.ico_ffed').slideUp();
			var height=el.width()*0.6;
			jQuery('<div class="video-box text-center" style="height:'+height+'px;">'+html+'<a href="javascript:;" class="video-box-close"><i class="glyphicon glyphicon-menu-up"></i> {lang retract}</a></div>').hide().insertAfter(el.find('.name_ffed')).slideDown();
		}
		return false;
	});
	jQuery(document).on(tap,'.video-box-close',function(e){//视频预览
		jQuery(this).parent().slideUp(function(){jQuery(this).remove()});
		jQuery(this).closest('.file_fed').find('.ico_ffed').slideDown();
		return false;
	});
	<!--{if $ismobile}-->
	jQuery('#publish_stick button.gw').on('touchstart.stick',function(){
		var el=jQuery('#publish_stick');
		if(el.hasClass('hover')){
			el.removeClass('hover');
			jQuery(document).off('touchstart.stick');
		}else{
			el.addClass('hover');
			jQuery(document).off('touchstart.stick').on('touchstart.stick',function(e){
				if(!jQuery(e.target).closest('#publish_stick').length){
					el.removeClass('hover');
				}
			});
		}
			
	});
	<!--{else}-->
	jQuery('#publish_stick').on('mouseenter',function(){
		jQuery(this).addClass('hover');
	});
	jQuery('#publish_stick').on('mouseleave',function(){
		jQuery(this).removeClass('hover');
	});
	<!--{/if}-->
	jQuery('.V').on(tap,function(){
		var type=jQuery(this).data('type');
		if(type=='qrcode'){
			if(window.wxready){
				wx.scanQRCode({
					desc: 'scanQRCode desc',
					needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
					scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
					success: function (res) {
						var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
						if(res.resultStr){
							jQuery.post('{MOD_URL}&op=ajax&do=publish&json=1',{jid:'{$jid}',type:'text',content:res.resultStr,publishsubmit:'true',formhash:'{FORMHASH}'},function(json){
								if(json.msg=='success'){
									showmessage('{lang scavenging_content_is_saved_successfully}','success',3000,1);
									jQuery.get('{MOD_URL}&op=ajax&do=getItem&rid='+json.rid,function(html){
									
										var tel=jQuery('#itemContainer>.list-item:first');
										if(tel.length){
											jQuery(html).hide().insertBefore(tel).slideDown();
										}else{
											jQuery(html).hide().appendTo('#itemContainer').slideDown();
										}
										
									});
								}else if(json.error){
									showmessage(json.error,'danger',3000,1);
								}
							},'json');
						}
					}
				});
			}
			return false
		}else{
            publish_menu(type,'{MOD_URL}&op=ajax&do=publish&jid={$jid}&type='+type);
			jQuery('#publish_stick').removeClass('hover');
			return false;
		}
	});
	
	jQuery('.js-popbox').each(function(){
		jQuery(this).popbox();
	});
	<!--{if $ismobile && 0}-->
	jQuery(document).on('touchstart','.list-item,.cmt-item,.image-item,.attach-item',function(){
		jQuery(this).addClass('hover');
	});
	jQuery(document).on('touchend','.list-item,.cmt-item,.image-item,.attach-item',function(){
		jQuery(this).removeClass('hover');
	});
	<!--{else}-->
	jQuery(document).on('mouseover','.list-item,.cmt-item,.image-item,.attach-item',function(){
		jQuery(this).addClass('hover');
	});
	jQuery(document).on('mouseout','.list-item,.cmt-item,.image-item,.attach-item',function(){
		jQuery(this).removeClass('hover');
	});
	<!--{/if}-->
	
	
	
	if(document.getElementById('imgbg')){
		setImage(document.getElementById('imgbg'));
	}
    if(isHash()){
        setSearchValue();
    } else {
        loadfirst('{MOD_URL}&op=ajax&do=loadmore&jid=$jid&rid=$_GET[rid]');
    }
	
});
function initAtwho(){
	var cachequeryMentions = [], itemsMentions;
    jQuery('#notes').atwho({
       at: "@",
		data: '{MOD_URL}&op=ajax&do=getAtList&jid=$jid',
		callbacks:{
					remote_filter: function (query, render_view) {
                        console.log(query);
						var thisVal = query,
						self = jQuery(this);
						if( !self.data('active') && thisVal.length >= 1 ){
							self.data('active', true);                            
							itemsMentions = cachequeryMentions[thisVal]
							if(typeof itemsMentions == "object"){
								render_view(itemsMentions);
							}else
							{                            
								if (self.xhr) {
									self.xhr.abort();
								}
								self.xhr = jQuery.getJSON('{MOD_URL}&op=ajax&do=getAtList&jid=$jid',{
									term: thisVal
								}, function(data) {
									cachequeryMentions[thisVal] = data
									render_view(data);
								});
							}                            
							self.data('active', false);                            
						}                    
					}
		},
		 tpl: "<li data-value='@[${name}:${id}]' title='${title}'>${avatar}&nbsp;${name}</li>",
		 search_key: "searchkey",
		 start_with_space: false,
		 limit: 5,
		 max_len: 20,
		 display_timeout: 300
    });
}
jQuery(function(){
  jQuery("[data-toggle='tooltip']").tooltip();
  initAtwho();
  jQuery('#atwho').on('mousedown',function(){
  		var textarea = jQuery(".addNotes").find("textarea[name='content']");
		if(textarea.val()==''){
			textarea.val('@');
		}else{
			textarea.val(textarea.val()+'@');
		}
		textarea.caret('pos',textarea.val().length);
		textarea.focus().atwho('run'); 
		return false;
	});
});
</script>
<!--{template common/footer_simple}--> 
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script> 
<script type="text/javascript" src="static/jquery_file_upload/jquery.ui.widget.js?{VERHASH}"></script>
<script type="text/javascript" src="static/jquery_file_upload/jquery.iframe-transport.js?{VERHASH}"></script>
<!-- The basic File Upload plugin -->
<script type="text/javascript" src="static/jquery_file_upload/jquery.fileupload.js?{VERHASH}"></script>
<script type="text/javascript" src="static/jquery_file_upload/jquery.fileupload-process.js?{VERHASH}"></script>
<script type="text/javascript" src="static/jquery_file_upload/jquery.fileupload-validate.js?{VERHASH}"></script>
<script type="text/javascript" src="static/js/jquery.ui.core.js?{VERHASH}"></script>
<script type="text/javascript" src="static/js/datepicker/jquery.ui.datepicker.min.js?{VERHASH}"></script>

